<template>
  <div style="height: 50px;line-height: 50px;background: #42b983;color: #ffffff">
    <span>
      {{count}}--{{message}}
    </span>
    <br />
    <button @click="changeMsg('change message haha')">changeMsg</button>
  </div>
</template>

<script setup>
  defineProps({
    count: Number,
    message: String,
  })
  const emit = defineEmits(['change-message'])

  const changeMsg = (msg)=>{
    emit('change-message', msg)
  }
</script>

<style scoped>

</style>
